feat(python): use pyrefly and ruff to replace pylsp#1489
feat(python): use pyrefly and ruff to replace pylsp#1489Cloud0310 wants to merge 6 commits intoayamir:mainfrom Cloud0310:0.11
Conversation
|
i'm wondering why pyrefly instead of ty. some articles i read earlier this year: also, tbh, i think it's too early to introduce pyrefly nor ty to this widely-used nvimdots since their both in their early stage. |
|
Make all of them as configurable options seems a better choice? |
|
tbh, i think we can close this PR now and wait 'til they got more mature |
This reverts commit d0f1faa.
Doing a refactor for this now, later I will PR again. |
|
sry for the little bugs here, please review again. 🤕 |
|
Also, I'm thinking about whether the LSP config should be aligned with original |
|
Sorry I'm so busy that I haven't been able to participate much. Personally, I don't know if I need to change it from pylsp (I've never used pyrefly but...). am concerned that if exceptional handling is permitted in a particular language, it will lead to the possibility that the introduction of unstable LSPs will also be permitted in other languages in the future. For now, I would like to make a proposal to put it on hold for discussions, projects, etc. |
I also agree with the idea of making it a proposal. Happy to help with this, anything I can do further? |
|
I would like to open the pr again when its more suitable to swtich to new python lsp, closing this now. |
Recently, I tried both of them. I guess now the pyrefly is more implemented then ty, base on my own basic using experience. The pyrefly would correctly imply type from basic python std lib most of the time. On the contrary, ty contains loads of |
looking cool! there's also a new blog of the pyrefly devs tested on numpy. sounds solid for me! but i have some suggestions for the pr:
|
I will try to reopen and PR again, thanks for the suggestions. It's been my first time to contribute to a neovim project, if there's problems just let me know. |
|
@CharlesChiuGit After a little bit of research, now none-ls regards ruff as a LSP instead of a formatter. Hence, we have two options:
Guess the second options is more reasonable for me, I would like your idea on this. |
cool, sounds gd to me. but since we block server formatting capabilities by default, don't forget to add u can check why we block server formatting by default in https://github.com/ayamir/nvimdots/wiki/Knowledge-Garden#-lsp-related-issues. |
|
@CharlesChiuGit Thanks for your help, fixed now. |
Using pyrelfy to replace the default pylsp as the lsp, using ruff as the linter and formatter.